package com.lhz.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lhz.usercenter.domain.User;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;


/**
 *
 */
@Service
public interface UserService extends IService<User> {
    /**
     * 用户注册
     * @param userAccount 账号
     * @param userPassword 密码
     * @param checkPassword 检查密码
     * @return 新用户id
     */
    long userRegister(String userAccount,String userPassword,String checkPassword);


    /**
     *  用户登录
     * @param userAccount 账号
     * @param userPassword 密码
     * @param request
     * @return
     */
    User doLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 用户脱敏
     * @param originUser
     * @return
     */
    User getSafeUser(User originUser);

    /**
     *  用户注销
     * @param request
     * @return
     */
    int userLogout(HttpServletRequest request);

}
